You are here: Dragonfly Key Features > Modifying and Transforming Datasets > Sampling Datasets

Sampling Datasets

In the Dataset Sampler panel, shown below, you can modify the resolution of volumetric data by upsampling (decreasing spacing or increasing the number of voxels) or by downsampling (increasing spacing or decreasing the number of voxels). You should note that although sampling reduces or increases the resolution of 3D datasets, the size of the original volume is always maintained.

Dataset Sampler panel

Dataset Sampler panel

Options for sampling datasets

 

Description

New sizing

Lets you adjust the resolution of a dataset by applying new spacing values that define the voxel size, or by changing the number of pixels in the X, Y, and/or Z axis. You can also choose an upsampling or downsampling factor.

Spacing… The selected Output values determine the spacing between image slices along each axis in the output dataset. Increasing the spacing along any axis will reduce the number of image slices within the corresponding plane by downsampling. Decreasing the spacing along any axis will increase the number of image slices within the corresponding plane by upsampling.

Voxels… The selected Output values determine the number of image slices along each axis that will be present in the output dataset. Increasing the number of pixels will decrease the spacing between image slices in the dataset, while decreasing the number of pixels will increase the spacing between image slices.

Upsample by a factor… Lets you select an upsampling factor that will be applied to the spacing values of the input dataset. For an input spacing size of 3.04 nm and an upsample factor of 2, the resulting spacing size will be 1.52 nm. Likewise, for an input matrix size of 512 x 512 x 256 and an upsample factor of 2, the resulting matrix will be 1024 x 1024 x 512.

Downsample by a factor… Lets you select a downsampling factor that will be applied to the spacing values of the input dataset. For an input spacing size of 3.04 nm and a downsample factor of 2, the resulting spacing size will be 6.08 nm. Likewise, for an input matrix size of 512 x 512 x 256 and a downsample factor of 2, the resulting matrix will be 256 x 256 x 128.

Sampling

Determines the type of interpolation — Nearest, Linear, or Cubic — that will be applied when the dataset is sampled.

Nearest… This basic interpolation scheme requires the least processing time because it only considers one pixel — the one closest to the interpolated point. You should note that the Nearest algorithm may cause resampled images to be shifted with regard to the original by the difference between the positions of the coordinate locations. This means that the Nearest algorithm cannot be used when it is necessary to preserve sub-pixel image relations.

Linear… This interpolation scheme considers the closest 2x2 neighborhood of known pixel values surrounding the unknown pixel. It then takes a weighted average of these four pixels to arrive at its final interpolated value. Linear interpolation amounts to convolution of the sampled image by a triangle function and can result in much smoother looking images than Nearest.

Cubic… This interpolation scheme goes one step beyond linear by considering the closest 4x4 neighborhood of known pixels — for a total of 16 pixels. Since these are at various distances from the unknown pixel, closer pixels are given a higher weighting in the calculation. Cubic interpolation can produce noticeably sharper images than the previous two methods, and is perhaps the ideal combination of processing time and output quality. This scheme can produce smoother results, but it has a higher computational cost.

Create new dataset

Transformations that involve sampling can be implemented by either one of two mechanisms — at the input so that the original image data is transformed, or at the output so that a new dataset is created and the original remains unmodified.

 

Dragonfly Help Live Version